package com.our.sys.project1.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import org.springside.modules.orm.grid.ViewField;

@Entity
@Table(name = "T_StockDetail")
public class StockDetail implements Serializable {

    private static final long serialVersionUID = 6579928187793515627L;

    @ViewField
    private Long id;
    @ViewField
    private Long stockInId;
    @ViewField(header = "物品", width = 100, align = "left")
    private String name;
    @ViewField(header = "规格", width = 100, align = "left")
    private String spec;
    @ViewField(header = "数量", width = 100, align = "left")
    private Long amount;
    @ViewField(header = "进价", width = 100, align = "left")
    private BigDecimal price;
    @ViewField(header = "单位", width = 100, align = "left")
    private String unit;
    @ViewField(header = "进价金额", width = 100, align = "left")
    private BigDecimal allMoney;

    @Id
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "Id_Generator")
    @TableGenerator(name = "Id_Generator", table = "ID_GENERATOR", pkColumnName = "GEN_NAME", valueColumnName = "GEN_VAL", pkColumnValue = "T_StockDetail")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getStockInId() {
        return stockInId;
    }

    public void setStockInId(Long stockInId) {
        this.stockInId = stockInId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public Long getAmount() {
        return amount;
    }

    public void setAmount(Long amount) {
        this.amount = amount;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public BigDecimal getAllMoney() {
        return allMoney;
    }

    public void setAllMoney(BigDecimal allMoney) {
        this.allMoney = allMoney;
    }

}
